Hello, |
Re: Suppressing DOORS report popups in DOORS9 string err = "" noError // do something dodgy err = lastError if (err "" != "") { infoBox("Something went wrong: " err) } The call to noError suppresses error reporting until a call is made to lastError, which ...err... returns the last error. As an aside, I do not know of a way to suppress the dialog that doors shows when you fail to open a module for exclusive edit because someone else has a lock on it. The only way round this is to check for locks before attempting to edit. Tony |
Re: Suppressing DOORS report popups in DOORS9 Tony_Goodman - Thu Dec 30 15:49:02 EST 2010 Module fmSafeLoad(Module mModule, Baseline bBaseline, string &sError) { Module mNew if(baselineExists(mModule, bBaseline)) { noError mNew = load(mModule, bBaseline, false) sError = lastError() } return mNew } So, |
Re: Suppressing DOORS report popups in DOORS9 You can do this mindfully. As Tony said trap the errors with noError()/lastError(); and if there's an error use the following:
void closeDB(DB dbXX)
{ hide(dbXX)
}
void RealizeMessage(string Message)
{
DB db = create("")
DBE dbe = label(db, Message)
close(db, false, closeDB)
realize(db)
}
RealizeMessage("Hello\n2nd Line")
print "Hello"
|